<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use App\Kuafu\User\Model\Role;

class RoleSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $insertArr = [
            ['name' => '夸父-超级管理员', 'brandId' => 1, 'shopId' => 0, 'status' => 0, 'isDeleted' => 0, 'createdAt' => time(), 'updatedAt' => time()],
            ['name' => '心有-超级管理员', 'brandId' => 2, 'shopId' => 0, 'status' => 1, 'isDeleted' => 0, 'createdAt' => time(), 'updatedAt' => time()],
            ['name' => '喜姐-超级管理员', 'brandId' => 3, 'shopId' => 0, 'status' => 1, 'isDeleted' => 0, 'createdAt' => time(), 'updatedAt' => time()],

            ['name' => '超级管理员', 'brandId' => 1, 'shopId' => 3, 'status' => 0, 'isDeleted' => 0, 'createdAt' => time(), 'updatedAt' => time()],
            ['name' => '店长', 'brandId' => 1, 'shopId' => 1, 'status' => 4, 'isDeleted' => 0, 'createdAt' => time(), 'updatedAt' => time()],
        ];

        $table = Role::query()->getModel()->getTable();
        DB::table($table)->truncate();
        DB::table($table)->insert($insertArr);
    }
}
